package com.nts.visionworks.business.schedule.domain;

// Generated 2013. 6. 23 ���� 6:33:40 by Hibernate Tools 4.0.0

import com.nts.visionworks.business.endpoint.domain.EndPoint;
import com.nts.visionworks.core.validation.EntityIdNotNull;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * ScheduleEndPointPower generated by hbm2java
 */
@Entity
@Table(name = "schedule_end_point_power", catalog = "visionworks")
public class ScheduleEndPointPower implements java.io.Serializable
{

	private Integer powerScheduleId;
	private Schedule schedule;
	private EndPoint endPoint;

	public ScheduleEndPointPower()
	{
	}

	public ScheduleEndPointPower(Schedule schedule, EndPoint endPoint)
	{
		this.schedule = schedule;
		this.endPoint = endPoint;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "PowerScheduleId", unique = true, nullable = false)
	public Integer getPowerScheduleId()
	{
		return this.powerScheduleId;
	}

	public void setPowerScheduleId(Integer powerScheduleId)
	{
		this.powerScheduleId = powerScheduleId;
	}

	@EntityIdNotNull(message = "validation.scheduleEndPointPower.schedule.notNull")
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ScheduleId", nullable = false)
	public Schedule getSchedule()
	{
		return this.schedule;
	}

	public void setSchedule(Schedule schedule)
	{
		this.schedule = schedule;
	}

	@EntityIdNotNull(message = "validation.scheduleEndPointPower.endPoint.notNull")
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "EndPointId", nullable = false)
	public EndPoint getEndPoint()
	{
		return this.endPoint;
	}

	public void setEndPoint(EndPoint endPoint)
	{
		this.endPoint = endPoint;
	}

}
